package com.pz.cloud.framework.business.volunteerTeam.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pz.cloud.framework.base.model.WorkflowEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 志愿者队伍成员
 * @author mzz
 */
@Data
@TableName("volunteer_team_user")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "volunteer_team_user", description = "志愿者队伍成员")
public class VolunteerTeamUser extends WorkflowEntity {
    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;

    private String volunteerTeamId;

    @ApiModelProperty(value = "成员id", required = true)
    private String userId;

    @ApiModelProperty(value = "成员名称", required = true)
    @Excel(name = "姓名", width = 15)
    private String realname;

    /**
     * 是否负责人 0否 1是
     */
    @ApiModelProperty(value = "是否负责人 0否 1是",required = true)
    private Integer isDirector;

    /**
     * 职务，关联职务表
     */
//    @Excel(name = "职务", width = 15)
    @Dict(dictTable ="sys_position",dicText = "name",dicCode = "code")
    private String positionCode;

    private String reason;

    @ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY)
    @TableField(exist = false)
    @Excel(name = "志愿者队伍", width = 15)
    private String teamName;

    @ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY)
    @TableField(exist = false)
    @Excel(name = "负责人", width = 15)
    private String teamDirector;


    /**学院*/
    @Excel(name = "学院", width = 15)
    @ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY)
    @TableField(exist = false)
    private String college;

    /**专业*/
    @Excel(name = "专业", width = 15)
    @ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY)
    @TableField(exist = false)
    private String major;

    /**年级*/
    @Excel(name = "年级", width = 15)
    @ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY)
    @TableField(exist = false)
    private String grade;

    /**班级*/
    @Excel(name = "班级", width = 15)
    @ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY)
    @TableField(exist = false)
    private String clazz;

    @ApiModelProperty(accessMode = ApiModelProperty.AccessMode.READ_ONLY)
    @TableField(exist = false)
    private String stdNo;

    @ApiModelProperty(value = "加入时间")
    @Excel(name = "加入时间", width = 15,format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date joinTime;//加入时间

    @ApiModelProperty(value = "离开时间")
    @Excel(name = "离开时间", width = 15,format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date leaveTime;//离开时间
}
